<template>
        <el-table :data="tableData" border v-loading="tableLoading" style="border-radius: 7px">
            <el-table-column
                    v-for="field in fieldMap" :prop="field.value" :label="field.label" :key="field.value">
            </el-table-column>
        </el-table>
</template>
<script>
    export default {
        data() {
            return {
                fieldMap: [{
                    value: "title",
                    label: "职位"
                }, {
                    value: "url",
                    label: "链接"
                }, {
                    value: "company",
                    label: "公司"
                }, {
                    value: "location",
                    label: "地址"
                }, {
                    value: "minoffer",
                    label: "最低工资"
                },{
                    value:"maxoffer",
                    label:"最高工资"
                },{
                    value:"city",
                    label:"城市"
                },{
                    value:"workExperience",
                    label:"工作经验"
                },{
                    value:"education",
                    label:"学历"
                },{
                    value:"trades",
                    label:"服务行业"
                },{
                    value:"companytype",
                    label:"民营公司"
                },{
                    value:"companysize",
                    label:"公司规模"
                }],

                tableData:[{}],
                tableLoading:false,
            }
        },

        created: function () {
            let url = BASE_URL + 'list';
            this.$http.get(url).then(function(data){
                /*alert(data.body)*/
                this.tableData = data.body
                /*console.log(data.body)
                console.log(this.tableData)*/
                this.tableLoading = false
            })




            //TODO

        },

        method:{
        }
    }


</script>
